<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue.js</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>

<body>
    <!-- vue-app是根容器 -->
    <div id="vue-app">
        <h1>v-if</h1>
        <button @click="error=!error">Toggle Error</button>
        <button @click="success=!success">Toggle Success</button>
        <!-- <p v-if="error">网络链接错误</p>
        <p v-else-if="success">网络链接成功</p> -->
        <p v-show="error">网络链接错误</p>
        <p v-show="success">网络链接成功</p>
    </div>
    <script src="app7.js"></script>
</body>

</html>